<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/public/include/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
<!--[if IE 8]>
<html lang="zh" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<!--<![endif]-->
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>系统信息</title>
<meta name="decorator" content="decList" />
<script type="text/javascript">
	/*
		JS全局变量:
		pageSize 每页记录数
		isPaginationValue 是否分页
		totalSize 总记录数
		currentPageNum 当前页号 默认为1
	 */
	var pageSize = "${query.pageSize}";
	var isPaginationValue = true;
	var totalSize = 0;
	var currentPageNum = 1;
	$(document).ready(function(){
		//===========注册事件  begin=================================
		//点击新增，弹出模态窗口
		$('#btnAddRecord').click(function(){
			addInitAjax();
		});

		$("#chkbxIsPagination").change(function(){
			if ($("#chkbxIsPagination").is(":checked")) {//选中  
				isPaginationValue = false;//勾选表示不分页
			} else {
				isPaginationValue = true;
			}
		});
		//注册查询点击事件
		$('#btnSearchFormSubmit').click(function(){
			to_page(1);
		});
		//是否删除，下拉时自动查询
		$('#slctIsDeleted').change(function(){
			to_page(1);
		});

		/*
		 功能：新增保存
		 说明：在弹出新增模态窗口中点击保存操作
		 */
		//点击保存，保存员工。
		$("#add_save_btn").click(function(){
			if(!validate_add_form()){
				return false;//校验表单
			};
			CommonUtils.AjaxUtil.RockAjax("${basePath}/upms/system/add", getFormJson("addForm"), {
				submitType : "POST",
				lazyTime : 1000,
				msgTitle : "操作结果",
				msg : "保存成功",
				wrong : "保存失败",
				error : "保存失败",
				successCallback : function(){
					to_page(1);//刷新列表函数
					$("#addModal").modal('hide');//关闭模态窗口

				}

			});
		});
		
		/*
		 功能：新增初始化
		 说明：点击新增按钮调用ajax执行后台程序
		 */
		function addInitAjax(){
			reset_form("#addModal form");//重置表单内容
			$.ajax({
				url : "${basePath}/upms/system/add",
				type : "GET",
				success : function(result){
					if (result.code == 111) {
						//var vo = result.extend.upmsSystem;
						//此处写初始化页面处理
						$("#addModal").modal({
							backdrop : "static"//弹出模态窗口
						});
					}
				}
			});
	
		}
		
		/*
		 功能：编辑保存
		 说明：在弹出修改模态窗口中点击保存操作
		 */
		$("#edit_save_btn").click(function(){
			CommonUtils.AjaxUtil.RockAjax("${basePath}/upms/system/edit", getFormJson("editForm"), {
				submitType : "POST",
				lazyTime : 1000,
				msgTitle : "操作结果",
				msg : "保存成功",
				wrong : "保存失败",
				error : "保存失败",
				successCallback : function(){
					to_page(1);//刷新列表函数
					$("#editModal").modal('hide');//关闭模态窗口

				}

			});
		});
		//===========注册事件  end=================================
		//页面加载完成后获取第一页数据	
		to_page(1);

	});
	
	

	/*
	功能:查看按钮点击事件
	说明:点击查看行操作后发起ajax请求，获取数据，将数据初始化模态页面，弹出模态窗口
	 */
	$(document).on("click", ".read_btn", function(){
		var id = $(this).attr("read-id");
		$.ajax({
			url : "${basePath}/upms/system/read/" + id,
			type : "GET",
			success : function(result){
				if (result.code == 111) {
					var vo = result.extend.upmsPermission;
										$("#id_read_static").text(vo.id);
										$("#systemId_read_static").text(vo.systemId);
										$("#pid_read_static").text(vo.pid);
										$("#name_read_static").text(vo.name);
										$("#uri_read_static").text(vo.uri);
										$("#visualType_read_static").text(vo.visualType);
										$("#type_read_static").text(vo.type);
										$("#remarks_read_static").text(vo.remarks);
										$("#permissionValue_read_static").text(vo.permissionValue);
										$("#icon_read_static").text(vo.icon);
										$("#createTime_read_static").text(vo.createTime);
										$("#createName_read_static").text(vo.createName);
										$("#seqno_read_static").text(vo.seqno);
										$("#readModal").modal({
						backdrop : "static"
					});
				}
			}
		});

	});

	/*
	 功能:删除按钮点击事件
	 说明:
	 1、点击删除行操作后弹窗提示
	 2、确认删除后发起ajax请求
	 3、删除成功或失败均提示
	 4、自动关闭或手动关闭提示信息
	 5、提示关闭后自动刷新页面（重庆获取当前页而不是第一页）
	 */
	$(document).on(
			"click",
			".delete_btn",
			function(){
				var id = $(this).attr("delete-id");
				//var empName = $(this).parents("tr").find("td:eq(2)").text();
				var tips = "确认删除该条记录？";
				CommonUtils.DialogUtil.setTitle("提示");
				CommonUtils.DialogUtil.setMsg(tips);
				CommonUtils.DialogUtil.setAlertClass(4);
				CommonUtils.DialogUtil.setButton('<button class="btn btn-danger" style="margin-right:20px" onclick="deleteAjax(\'' + id
						+ '\')"><i class="fa fa-times"></i>&nbsp;删除</button><button class="btn btn-primary" data-dismiss="modal">放弃删除</button>');
				CommonUtils.DialogUtil.show();

			});

	/*
	 功能:修改按钮点击事件
	 说明:点击修改行操作后发起ajax请求，获取数据，将数据初始化模态页面，弹出模态窗口
	 */
	$(document).on("click", ".edit_btn", function(){
		var id = $(this).attr("edit-id");
		$("#id_edit_static").val(id);
		$.ajax({
			url : "${basePath}/upms/system/edit/" + id,
			type : "GET",
			success : function(result){
				if (result.code == 111) {
					var vo = result.extend.upmsPermission;
										$("#id_edit_input").val(vo.id);
										$("#systemId_edit_input").val(vo.systemId);
										$("#pid_edit_input").val(vo.pid);
										$("#name_edit_input").val(vo.name);
										$("#uri_edit_input").val(vo.uri);
										$("#visualType_edit_input").val(vo.visualType);
										$("#type_edit_input").val(vo.type);
										$("#remarks_edit_input").val(vo.remarks);
										$("#permissionValue_edit_input").val(vo.permissionValue);
										$("#icon_edit_input").val(vo.icon);
										$("#createTime_edit_input").val(vo.createTime);
										$("#createName_edit_input").val(vo.createName);
										$("#seqno_edit_input").val(vo.seqno);
										$("#editModal").modal({
						backdrop : "static"
					});
				}
			}
		});
	});

	

	//删除ajax调用
	function deleteAjax(id){
		CommonUtils.AjaxUtil.RockAjax("${basePath}/upms/system/delete" + '/' + id, '', {
			submitType : "GET",
			lazyTime : 1000,
			msgTitle : "操作结果",
			msg : "删除成功",
			wrong : "删除失败",
			error : "删除失败",
			successCallback : function(){
				to_page(currentPageNum);//删除后回到当前页
			}
		//completeCallback:function(){alert('完成回调');}
		});
	}
	
	//校验新增表单（前端校验）
	function validate_add_form(){
		//自动代码为不为空和长度校验，请据实修改
															var systemId = $("#systemId_add_input").val();
				if(strlen(systemId)==0){
					show_validate_msg("#systemId_add_input", "error", "所属系统ID不能为空！");
					return false;
				}
								else{
						show_validate_msg("#systemId_add_input", "success", "");//去除提示
					}
																													var name = $("#name_add_input").val();
				if(strlen(name)==0){
					show_validate_msg("#name_add_input", "error", "名称不能为空！");
					return false;
				}
								else if (strlen(name)>50){
						show_validate_msg("#name_add_input", "error", "名称不能超过50个字！");
						return false;
					}else{
						show_validate_msg("#name_add_input", "success", "");//去除提示
					}
																																						var type = $("#type_add_input").val();
				if(strlen(type)==0){
					show_validate_msg("#type_add_input", "error", "类型1目录2菜单3操作不能为空！");
					return false;
				}
								else{
						show_validate_msg("#type_add_input", "success", "");//去除提示
					}
																													var permissionValue = $("#permissionValue_add_input").val();
				if(strlen(permissionValue)==0){
					show_validate_msg("#permissionValue_add_input", "error", "权限值不能为空！");
					return false;
				}
								else if (strlen(permissionValue)>32){
						show_validate_msg("#permissionValue_add_input", "error", "权限值不能超过32个字！");
						return false;
					}else{
						show_validate_msg("#permissionValue_add_input", "success", "");//去除提示
					}
																																																	return true;
	}
	

	/*
		函数名：to_page(pageNum)
		说明：ajax数据列表显示入口，JSON 数据对应后台Query.java 属性
		参数：pageNum：页号
		调用示例：to_page(5)//加载第5页
		其他说明：每次获取页面均会将查询等条件提交到后台
		pageSize：从全局变量获取
		isPaginationValue：全局变量获取
		extend：通过表单转换
	 */
	function to_page(pageNum){
		//加载遮罩====begin=======
		var startTime = new Date();//调用开始时间
		var Dialog2 = CommonUtils.DialogUtil;
		Dialog2.setLoading(1);//1读取，2提交
		Dialog2.setTitle("-");
		Dialog2.show();
		//加载遮罩====begin=======
		var extend = getFormJson("searchForm");
		$.ajax({
			url : "${basePath}/upms/system/list",
			data : {
				"pageNum" : pageNum,
				"pageSize" : pageSize,
				"isPagination" : isPaginationValue,
				"extend" : extend
			},
			type : "POST",
			dataType : "json",
			success : function(result){
				console.log(result);
				$("#tableDataList tbody").empty();//清空数据区
				$("#divPageNavArea").empty();
				//加载列表数据
				loadDataList(result);
				//加载分页信息
				if (totalSize != 0) {
					loadPageInfo(result);
				}
				//加载查询条件
				//loadQueryInfo(result);
				//加载其他信息
				//loadOtherInfo(result);
				Dialog2.hide();//加载完后关闭遮罩
				window.setTimeout(function(){
					//modal-open  去除属性回复滚动条
					$("body").removeClass("modal-open");
				}, 620);
			},
			error : function(){
				alert('调用ajax 失败');
			}
		});
	}

	//加载列表数据
	function loadDataList(result){
		//console.log("hotdog2============="+result);
		totalSize = result.extend.pageInfo.total;//总记录数赋给全局变量
		currentPageNum = result.extend.pageInfo.pageNum;//当前页号给全局变量
		if (totalSize == 0) {
			var nodateTd = $("<td colspan=\"11\"></td>").append("<p class=\"text-danger\">没有显示的数据</p>");
			//载入到tbody中
			$("<tr></tr>").append(nodateTd).appendTo("#tableDataList tbody");
		} else {
			var vo = result.extend.pageInfo.list;
			$.each(vo, function(index , item){
				var checkbox = $("<td><input type=\"checkbox\" name=\"check-list\" /></td>");
		
																				var systemId = $("<td></td>").append(item.systemId);
																var pid = $("<td></td>").append(item.pid);
																var name = $("<td></td>").append(item.name);
																var uri = $("<td></td>").append(item.uri);
																var visualType = $("<td></td>").append(item.visualType);
																var type = $("<td></td>").append(item.type);
																var remarks = $("<td></td>").append(item.remarks);
																var permissionValue = $("<td></td>").append(item.permissionValue);
																var icon = $("<td></td>").append(item.icon);
																var createTime = $("<td></td>").append(item.createTime);
																var createName = $("<td></td>").append(item.createName);
																var seqno = $("<td></td>").append(item.seqno);
												//查看按钮
				var readBtn = $("<button></button>").addClass("btn btn-xs btn-primary read_btn").append($("<li></li>").addClass("fa fa-eye")).append(
						"查看").attr("read-id", item.id);
				//修改按鈕
				var editBtn = $("<button></button>").addClass("btn btn-xs btn-primary edit_btn").append(
						$("<li></li>").addClass("fa fa-pencil-square-o")).append("修改").attr("edit-id", item.id);
				//刪除按鈕
				var delBtn = $("<button></button>").addClass("btn btn-xs btn-danger delete_btn").append("删除").attr("delete-id", item.id);
				var btnTd = $("<td></td>").append(readBtn).append(" ").append(editBtn).append(" ").append(delBtn);
				//载入到tbody中
				$("<tr></tr>").append(checkbox)
																							  .append(systemId)
																			  .append(pid)
																			  .append(name)
																			  .append(uri)
																			  .append(visualType)
																			  .append(type)
																			  .append(remarks)
																			  .append(permissionValue)
																			  .append(icon)
																			  .append(createTime)
																			  .append(createName)
																			  .append(seqno)
												   			  .append(btnTd).appendTo("#tableDataList tbody");
			});
		}
	}

	/*
		 函数名：loadPageInfo(result)
	 	说明：加载ajax返回的列表数据
	 	参数：result：ajax返回值
	 	调用示例：
	 */
	function loadPageInfo(result){
		//========构建每页记录数下拉 begin=================
		var size = result.extend.pageInfo.size;//分页插件返回的每页记录数
		var sizeSelect = $("<select></select>");
		var sizeValue = 0;
		for (var i = 0; i < 9; i++) {
			if (i <= 5) {
				sizeValue = sizeValue + 5;//第一个是5
			} else {
				sizeValue = sizeValue + 10;//后面的递增10
			}
			if (sizeValue == pageSize) {
				//数据匹配是为选中
				sizeSelect.append("<option  selected=\"selected\"  value=\""+sizeValue+"\">" + sizeValue + "</option>");
			} else {
				sizeSelect.append("<option   value=\""+sizeValue+"\">" + sizeValue + "</option>");
			}
		}
		sizeSelect.addClass("g-pages");
		sizeSelect.attr("id", "sizeSelect").attr("name", "sizeSelect").attr("onchange", "sizeSelectChange()").attr("size", "1");
		//========构建每页记录数下拉    end=================
		var nav_div = $("<div></div>").addClass("dataTables_info pull-left");
		if (isPaginationValue && totalSize != 0) {
			nav_div.append("当前第" + result.extend.pageInfo.pageNum + "页-共" + result.extend.pageInfo.pages + "页-每页").append(sizeSelect).append(
					"条-总" + totalSize + "条记录");
		} else {
			nav_div.append("当前第1页-共1页").append("-总" + totalSize + "条记录");
		}

		nav_div.attr("aria-live", "polite").attr("role", "status").attr("id", "table_info");
		//构建页码导航
		var nav_ul = $("<ul></ul>").addClass("pagination pull-right");
		//构建：首页li
		var firstPageLi = $("<li></li>").append($("<a></a>").append("首页").attr("href", "#"));
		//构建：上一页li		
		var prePageLi = $("<li></li>").append($("<a></a>").append("上一页").attr("href", "#"));
		if (result.extend.pageInfo.hasPreviousPage == false) {
			//无上一页时，首页和上一页均不能点击
			firstPageLi.addClass("disabled");
			prePageLi.addClass("disabled");
		} else {
			//为元素添加点击翻页的事件
			firstPageLi.click(function(){
				//点击首页
				to_page(1);
			});
			prePageLi.click(function(){
				//点击上一页
				to_page(result.extend.pageInfo.pageNum - 1);
			});
		}
		//构建：下一页li
		var nextPageLi = $("<li></li>").append($("<a></a>").append("下一页").attr("href", "#"));
		//构建：末页li
		var lastPageLi = $("<li></li>").append($("<a></a>").append("末页").attr("href", "#"));
		if (result.extend.pageInfo.hasNextPage == false) {
			nextPageLi.addClass("disabled");
			lastPageLi.addClass("disabled");
		} else {
			nextPageLi.click(function(){
				//点击下一页
				to_page(result.extend.pageInfo.pageNum + 1);
			});
			lastPageLi.click(function(){
				//点击末页
				to_page(result.extend.pageInfo.pages);
			});
		}
		//添加：首页li和前一页li 
		nav_ul.append(firstPageLi).append(prePageLi);
		if (isPaginationValue && totalSize != 0) {
			//分页查询时，遍历添加页码
			$.each(result.extend.pageInfo.navigatepageNums, function(index , item){
				//构建：页码li
				var numLi = $("<li></li>").append($("<a></a>").append(item).attr("href", "#"));
				if (result.extend.pageInfo.pageNum == item) {
					numLi.addClass("active");
				}
				numLi.click(function(){//点击页码
					to_page(item);
				});
				//添加：页码li
				nav_ul.append(numLi);
			});
		}
		//添加：下一页li和末页 li
		nav_ul.append(nextPageLi).append(lastPageLi);
		//载入页码导航区域
		$("#divPageNavArea").append(nav_div).append(nav_ul);
	}

	//改变每页记录条数函数
	function sizeSelectChange(){
		pageSize = $("#sizeSelect").val();//为全局变量赋值
		//改变每页显示记录的值是，重新查询显示第一页
		to_page(1);
	}

	
	
	
	//关闭模态弹窗
	function closeDialog(){
		CommonUtils.DialogUtil.closeFrame();
	}
	
	//清空表单样式及内容
	function reset_form(ele){
		$(ele)[0].reset();
		//清空表单样式
		$(ele).find("*").removeClass("has-error has-success");
		$(ele).find(".help-block").text("");
	}
	
	//显示校验结果的提示信息
	function show_validate_msg(ele,status,msg){
		//清除当前元素的校验状态
		$(ele).parent().removeClass("has-success has-error");
		$(ele).next("span").text("");
		if("success"==status){
			$(ele).parent().addClass("has-success");
			$(ele).next("span").text(msg);
		}else if("error" == status){
			$(ele).parent().addClass("has-error");
			$(ele).next("span").text(msg);
		}
	}
	
	
	/*
	 函数名：getFormJson(frm)
	说明：通用函数，用于将表单里的属性序列化为json字符串，key为表单name值
	参数：frm：表单ID
	调用示例：getFormJson("searchForm")//返回查询区的json串
	 */
	function getFormJson(frm){
		var o = {};
		var a = $("#" + frm).serializeArray();
		$.each(a, function(){
			if (o[this.name] !== undefined) {
				if (!o[this.name].push) {
					o[this.name] = [ o[this.name] ];
				}
				o[this.name].push(this.value || '');
			} else {
				o[this.name] = this.value || '';
			}
		});
		return o;
	}
	
	/*
		功能：计算字符串长度
		说明：汉字占2，英文占1
	*/
	function strlen(str){
		var len = 0;
		if(str==undefined){
			alert("调用strlen(str),参数str为undefined");
			return len;
		}
		if(str==null||str==""){
			return len;
		}
		for (var i = 0; i < str.length; i++) {
			var c = str.charCodeAt(i);
			//单字节加1 
			if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
				len++;
			} else {
				len += 2;
			}
		}
		return len;
	}
</script>
</head>
<body>
	<!-- 新增模态窗口 begin -->
	<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">新增系统信息</h4>
				</div>
				<div class="modal-body">
					<form id="addForm" class="form-horizontal">
						   						<div class="form-group">
							<label class="col-sm-3 control-label">
																<span class="text-danger">*</span>
								 所属系统ID：
							</label>
							<div class="col-sm-5">
								<input type="text" name="systemId" class="form-control" id="systemId_add_input" placeholder="输入所属系统ID">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 所属上级ID：
							</label>
							<div class="col-sm-5">
								<input type="text" name="pid" class="form-control" id="pid_add_input" placeholder="输入所属上级ID">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
																<span class="text-danger">*</span>
								 名称：
							</label>
							<div class="col-sm-5">
								<input type="text" name="name" class="form-control" id="name_add_input" placeholder="输入名称">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 路径（抽象的）：
							</label>
							<div class="col-sm-5">
								<input type="text" name="uri" class="form-control" id="uri_add_input" placeholder="输入路径（抽象的）">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 访问方式0登录1授权9无效：
							</label>
							<div class="col-sm-5">
								<input type="text" name="visualType" class="form-control" id="visualType_add_input" placeholder="输入访问方式0登录1授权9无效">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
																<span class="text-danger">*</span>
								 类型1目录2菜单3操作：
							</label>
							<div class="col-sm-5">
								<input type="text" name="type" class="form-control" id="type_add_input" placeholder="输入类型1目录2菜单3操作">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 备注：
							</label>
							<div class="col-sm-5">
								<input type="text" name="remarks" class="form-control" id="remarks_add_input" placeholder="输入备注">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
																<span class="text-danger">*</span>
								 权限值：
							</label>
							<div class="col-sm-5">
								<input type="text" name="permissionValue" class="form-control" id="permissionValue_add_input" placeholder="输入权限值">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 图标：
							</label>
							<div class="col-sm-5">
								<input type="text" name="icon" class="form-control" id="icon_add_input" placeholder="输入图标">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 创建时间：
							</label>
							<div class="col-sm-5">
								<input type="text" name="createTime" class="form-control" id="createTime_add_input" placeholder="输入创建时间">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 创建人：
							</label>
							<div class="col-sm-5">
								<input type="text" name="createName" class="form-control" id="createName_add_input" placeholder="输入创建人">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 同级顺序号：
							</label>
							<div class="col-sm-5">
								<input type="text" name="seqno" class="form-control" id="seqno_add_input" placeholder="输入同级顺序号">
								<span class="help-block"></span>
							</div>
						</div>
						 					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" id="add_save_btn">保存</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 新增模态窗口 end -->
	<!-- 修改模态窗口 begin -->
	<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">修改系统信息</h4>
				</div>
				<div class="modal-body">
					<form id="editForm" class="form-horizontal">
						<input type="hidden" name="id" id="id_edit_static">
						   						<div class="form-group">
							<label class="col-sm-3 control-label">
																<span class="text-danger">*</span>
								 所属系统ID：
							</label>
							<div class="col-sm-5">
								<input type="text" name="systemId" class="form-control" id="systemId_edit_input" placeholder="输入所属系统ID">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 所属上级ID：
							</label>
							<div class="col-sm-5">
								<input type="text" name="pid" class="form-control" id="pid_edit_input" placeholder="输入所属上级ID">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
																<span class="text-danger">*</span>
								 名称：
							</label>
							<div class="col-sm-5">
								<input type="text" name="name" class="form-control" id="name_edit_input" placeholder="输入名称">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 路径（抽象的）：
							</label>
							<div class="col-sm-5">
								<input type="text" name="uri" class="form-control" id="uri_edit_input" placeholder="输入路径（抽象的）">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 访问方式0登录1授权9无效：
							</label>
							<div class="col-sm-5">
								<input type="text" name="visualType" class="form-control" id="visualType_edit_input" placeholder="输入访问方式0登录1授权9无效">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
																<span class="text-danger">*</span>
								 类型1目录2菜单3操作：
							</label>
							<div class="col-sm-5">
								<input type="text" name="type" class="form-control" id="type_edit_input" placeholder="输入类型1目录2菜单3操作">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 备注：
							</label>
							<div class="col-sm-5">
								<input type="text" name="remarks" class="form-control" id="remarks_edit_input" placeholder="输入备注">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
																<span class="text-danger">*</span>
								 权限值：
							</label>
							<div class="col-sm-5">
								<input type="text" name="permissionValue" class="form-control" id="permissionValue_edit_input" placeholder="输入权限值">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 图标：
							</label>
							<div class="col-sm-5">
								<input type="text" name="icon" class="form-control" id="icon_edit_input" placeholder="输入图标">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 创建时间：
							</label>
							<div class="col-sm-5">
								<input type="text" name="createTime" class="form-control" id="createTime_edit_input" placeholder="输入创建时间">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 创建人：
							</label>
							<div class="col-sm-5">
								<input type="text" name="createName" class="form-control" id="createName_edit_input" placeholder="输入创建人">
								<span class="help-block"></span>
							</div>
						</div>
						  						<div class="form-group">
							<label class="col-sm-3 control-label">
								 同级顺序号：
							</label>
							<div class="col-sm-5">
								<input type="text" name="seqno" class="form-control" id="seqno_edit_input" placeholder="输入同级顺序号">
								<span class="help-block"></span>
							</div>
						</div>
						 					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" id="edit_save_btn">保存</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 修改模态窗口 end -->
	<!-- 查看模态窗口 begin -->
	<div class="modal fade" id="readModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">查看系统信息</h4>
				</div>
				<div class="modal-body">
					   					<div class="form-group">
						<label class="col-sm-3 control-label">所属系统ID：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="systemId_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">所属上级ID：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="pid_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">名称：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="name_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">路径（抽象的）：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="uri_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">访问方式0登录1授权9无效：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="visualType_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">类型1目录2菜单3操作：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="type_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">备注：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="remarks_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">权限值：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="permissionValue_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">图标：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="icon_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">创建时间：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="createTime_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">创建人：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="createName_read_static"></p>
						</div>
					</div>
					  					<div class="form-group">
						<label class="col-sm-3 control-label">同级顺序号：</label>
						<div class="col-sm-5">
							<p class="form-control-static" id="seqno_read_static"></p>
						</div>
					</div>
					 				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 查看模态窗口 end -->
	<!-- 列表主面板 begin -->
	<div class="contentpanel">
		<!-- 查询区 begin -->
		<div class="panel panel-default">
			<div class="panel-heading">
				<div class="panel-btns">
					<a href="#" class="minimize">−</a>
				</div>
				<h4 class="panel-title">查询条件</h4>
			</div>
			<div class="panel-body">
				<form id="searchForm" action="" class="form-horizontal" method="post">
					<div class="row">
						   						<div class="col-sm-6 col-md-4">
							<div class="form-group m-b-15">
								<label for="input1" class="control-label col-xs-5">所属系统ID：</label>
								<div class="col-xs-7">
									<input type="text" name="systemId" class="form-control" placeholder="输入所属系统ID" />
								</div>
							</div>
						</div>
						  						<div class="col-sm-6 col-md-4">
							<div class="form-group m-b-15">
								<label for="input1" class="control-label col-xs-5">所属上级ID：</label>
								<div class="col-xs-7">
									<input type="text" name="pid" class="form-control" placeholder="输入所属上级ID" />
								</div>
							</div>
						</div>
						  						<div class="col-sm-6 col-md-4">
							<div class="form-group m-b-15">
								<label for="input1" class="control-label col-xs-5">名称：</label>
								<div class="col-xs-7">
									<input type="text" name="name" class="form-control" placeholder="输入名称" />
								</div>
							</div>
						</div>
						                   						<div class="col-sm-6 col-md-4 pull-right text-right">
							<button id="btnSearchFormSubmit" type="button" class="btn btn-primary">
								<i class="fa fa-search"></i>
								查询
							</button>
						</div>
					</div>
				</form>
			</div>
		</div>
		<!-- 查询区 end -->
		<!-- 列表区begin -->
		<div class="panel panel-default">
			<div class="panel-heading">
				<div class="panel-btns">
					<a id="btnAddRecord" class="btn btn-xs btn-info">
						<i class="fa fa-plus" aria-hidden="true"></i>
						新增
					</a>
				</div>
				<h5 class="panel-title">
					<input id="chkbxIsPagination" name="isPagination" value="false" type="checkbox" />
					查询结果
				</h5>
			</div>
			<div class="panel-body">
				<div class="table-responsive">
					<table id="tableDataList" class="table table-bordered table-striped table-hover table-condensed">
						<thead>
							<tr>
								<th>
									<input type="checkbox" name="check-all" />
								</th>
								   								<th>所属系统ID</th>
								  								<th>所属上级ID</th>
								  								<th>名称</th>
								  								<th>路径（抽象的）</th>
								  								<th>访问方式0登录1授权9无效</th>
								  								<th>类型1目录2菜单3操作</th>
								  								<th>备注</th>
								  								<th>权限值</th>
								  								<th>图标</th>
								  								<th>创建时间</th>
								  								<th>创建人</th>
								  								<th>同级顺序号</th>
								 								<th>操作</th>
							</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
					<div id="divPageNavArea"></div>
				</div>
			</div>
		</div>
		<!-- 列表区end -->
	</div>
	<!-- 列表主面板 end -->
</body>
</html>